﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Edit.Master" Inherits="System.Web.Mvc.ViewPage<Langben.DAL.Area>" %>

<%@ Import Namespace="Common" %>
<%@ Import Namespace="Langben.App.Models" %>
<asp:Content ID="Content4" ContentPlaceHolderID="CurentPlace" runat="server">
    修改 数据字典
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>
            <input class="a2 f2" type="submit" value="修改" />
            <input class="a2 f2" type="button" onclick="BackAreaList('Area')" value="返回" />
        </legend>
        <div class="bigdiv">
            <%: Html.HiddenFor(model => model.Id ) %>     
            <div class="editor-label">
                <%: Html.LabelFor(model => model.MyTexts) %>：
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.MyTexts) %>
                <%: Html.ValidationMessageFor(model => model.MyTexts) %>
            </div>       
            <div class="editor-label" style="display: none">
                <a class="anUnderLine" onclick="showModalOnly('ParentId','../../Area');">
                    <%: Html.LabelFor(model => model.ParentId) %>
                </a>：
            </div>
            <div class="editor-field" style="display: none">
 
                <%: Html.HiddenFor(model => model.ParentId)%>
            </div>     
            <div class="editor-label" style="display: none">
                <%: Html.LabelFor(model => model.MyTables) %>：
            </div>
            <div class="editor-field" style="display: none">
                <%: Html.EditorFor(model => model.MyTables) %>
                <%: Html.ValidationMessageFor(model => model.MyTables) %>
            </div>     
            <div class="editor-label" style="display: none">
                <%: Html.LabelFor(model => model.MyColums) %>：
            </div>
            <div class="editor-field" style="display: none">
                <%: Html.EditorFor(model => model.MyColums) %>
                <%: Html.ValidationMessageFor(model => model.MyColums) %>
            </div>     
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Sort) %>：
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.Sort, new {  onkeyup = "isInt(this)", @class="text-box single-line" })%>
                <%: Html.ValidationMessageFor(model => model.Sort) %>
            </div>
            <br style="clear: both;" />
            <div class="editor-label">
                <%: Html.LabelFor(model => model.Remark) %>：
            </div>
            <div class="textarea-box">
                <%: Html.TextAreaFor(model => model.Remark) %>
                <%: Html.ValidationMessageFor(model => model.Remark) %>
            </div><%: Html.HiddenFor(model => model.CreateTime ) %><%: Html.HiddenFor(model => model.CreatePerson ) %>
            
            <div class="editor-label" style="display: none" id="pian1">
                <%: Html.LabelFor(model => model.Pai) %>：
            </div>
            <div class="editor-field" style="display: none" id="pian2">
                <%=Html.DropDownListFor(model => model.Pai,Models.SysFieldModels.GetSysField("Area","Pai"),"请选择")%>

                <%: Html.ValidationMessageFor(model => model.Pai) %>
            </div>

            <div class="editor-label" style="display: none" id="pian3">
                <%: Html.LabelFor(model => model.Hao) %>：
            </div>
            <div class="editor-field" style="display: none" id="pian4">
                <%=Html.DropDownListFor(model => model.Hao,Models.SysFieldModels.GetSysField("Area","Hao"),"请选择")%>
                <%: Html.ValidationMessageFor(model => model.Hao) %>
            </div>
        </div>
    </fieldset>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    
    <script type="text/javascript">

        $(function () {
            $.ajax({
                url: "../GetMyColums",
                type: "Post",
                data: { rowguid: '<%= ViewData["Id"] %>' },
                dataType: "text",
                success: function (data) {
                    if (data == "Qu") {
                        $("div[id^='pian']").css("display", "block");
                    }
                }
            });
        });
              
        function BackAreaList(url) {

            window.location.href = '../../' + url+"/Area";
        }
    </script>
</asp:Content>

